#include "AVLTree.h"

void test1()
{
	int arr[] = { 6,25,13,4,17,38,11,5,3,0,55,43,23 };
	AVLTree<int, int> a;
	for (auto e : arr)
	{
		a.Insert(make_pair(e, e));
		cout << e << ':' << a.IsBalance() << endl;
	}
	cout << endl;
	a.InOrder();
	cout << a.IsBalance() << endl;
}

void test2()
{
	const size_t N = 10000;
	srand(time(0));

	AVLTree<int, int> a;
	vector<int> v;
	v.reserve(N);

	for (size_t i = 0; i < N; i++)
	{
		v.push_back(rand());
	}

	for (auto e : v)
	{
		a.Insert(make_pair(e, e));
	}
	a.InOrder();
	a.IsBalance();
}

int main()
{
	//test1();

	test2();

	return 0;
}
